﻿using FPSO.Models.Constant;
using FPSO.Models.TagMapping;
using Microsoft.Practices.Prism.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FPSO.Models.ViewModel.Controls
{
    public class UCShipInfoViewModel : NotificationObject
    {
        public UCShipInfoViewModel()
        {
            calcMidPDraft = 0d;
            calcMidSDraft = 0d;
            calcAftPDraft = 0d;
			calcAftSDraft = 0d;
			calcFwdPDraft = 0d;
			calcFwdSDraft = 0d;
			calcHeel = 0d;
            calcTrim = 0d;

            realMidPDraft = 0d;
			realMidSDraft = 0d;
			realAftPDraft = 0d;
			realAftSDraft = 0d;
			realFwdPDraft = 0d;
			realFwdSDraft = 0d;
            realHeel = 0d;
            realTrim = 0d;
        }

        private double calcMidPDraft = 0d;
		private double calcMidSDraft = 0d;
		private double calcAftPDraft = 0d;
		private double calcAftSDraft = 0d;
		private double calcFwdPDraft = 0d;
		private double calcFwdSDraft = 0d;
        private double calcHeel = 0d;
        private double calcTrim = 0d;

        private double realMidPDraft = 0d;
		private double realMidSDraft = 0d;
		private double realAftPDraft = 0d;
		private double realAftSDraft = 0d;
		private double realFwdPDraft = 0d;
		private double realFwdSDraft = 0d;
        private double realHeel = 0d;
        private double realTrim = 0d;

        private double no5COTP_Volm;
        private double no5COTS_Volm;
        private double no4COTP_Volm;
        private double no4COTS_Volm;
        private double no3COTP_Volm;
        private double no3COTS_Volm;
        private double no2COTP_Volm;
        private double no2COTS_Volm;
        private double no1COTP_Volm;
        private double no1COTS_Volm;

        private double no5WBTP_Volm;
        private double no5WBTS_Volm;
        private double no4WBTP_Volm;
        private double no4WBTS_Volm;
        private double no3WBTP_Volm;
        private double no3WBTS_Volm;
        private double no2WBTP_Volm;
        private double no2WBTS_Volm;
        private double no1WBTP_Volm;
        private double no1WBTS_Volm;
        private double fpt_Volm;

		/// <summary>
		/// 计算舯吃水(左舷)
		/// </summary>
		public double CalcMidPDraft
        {
            get { return calcMidPDraft; }
            set
            {
				calcMidPDraft = value;
                RaisePropertyChanged("CalcMidPDraft");
            }
        }

        /// <summary>
        /// 计算舯吃水(右舷)
        /// </summary>
        public double CalcMidSDraft
		{
            get { return calcMidSDraft; }
            set
            {
				calcMidSDraft = value;
                RaisePropertyChanged("CalcMidSDraft");
            }
        }

        /// <summary>
        /// 计算艉吃水(左舷)
        /// </summary>
        public double CalcAftPDraft
        {
            get { return calcAftPDraft; }
            set
            {
				calcAftPDraft = value;
                RaisePropertyChanged("CalcAftPDraft");
            }
        }

		/// <summary>
		/// 计算艉吃水(右舷)
		/// </summary>
		public double CalcAftSDraft
		{
            get { return calcAftSDraft; }
            set
            {
				calcAftSDraft = value;
                RaisePropertyChanged("CalcAftSDraft");
            }
        }

		/// <summary>
		/// 计算艏吃水(左舷)
		/// </summary>
		public double CalcFwdPDraft
		{
			get { return calcFwdPDraft; }
			set
			{
				calcFwdPDraft = value;
				RaisePropertyChanged("CalcFwdPDraft");
			}
		}

		/// <summary>
		/// 计算艏吃水(右舷)
		/// </summary>
		public double CalcFwdSDraft
		{
			get { return calcFwdSDraft; }
			set
			{
				calcFwdSDraft = value;
				RaisePropertyChanged("CalcFwdSDraft");
			}
		} 
		
		/// <summary>
		/// 计算横倾
		/// </summary>
		public double CalcHeel
        {
            get { return calcHeel; }
            set
            {
                calcHeel = value;
                RaisePropertyChanged("CalcHeel");
            }
        }

        /// <summary>
        /// 计算纵倾
        /// </summary>
        public double CalcTrim
        {
            get { return calcTrim; }
            set
            {
                calcTrim = value;
                RaisePropertyChanged("CalcTrim");
            }
        }

        /// <summary>
        /// 监测艉吃水(左舷)
        /// </summary>
        [FieldMapper("SHIP.REAL_AFTP_DRAFT", TypeCode.Int32, TankConstant.DRAFTSTATUS_PARAM)]
        public double RealAftPDraft
        {
            get { return realAftPDraft; }
            set
            {
				realAftPDraft = value;
                RaisePropertyChanged("RealAftPDraft");
            }
        }

		/// <summary>
		/// 监测艉吃水(右舷)
		/// </summary>
		[FieldMapper("SHIP.REAL_AFTS_DRAFT", TypeCode.Int32, TankConstant.DRAFTSTATUS_PARAM)]
		public double RealAftSDraft
		{
			get { return realAftSDraft; }
			set
			{
				realAftSDraft = value;
				RaisePropertyChanged("RealAftSDraft");
			}
		}
		
		/// <summary>
		/// 监测舯吃水(左舷)
		/// </summary>
		[FieldMapper("SHIP.REAL_MIDP_DRAFT", TypeCode.Int32, TankConstant.DRAFTSTATUS_PARAM)]
        public double RealMidPDraft
        {
            get { return realMidPDraft; }
            set
            {
				realMidPDraft = value;
                RaisePropertyChanged("RealMidPDraft");
            }
        }

		/// <summary>
		/// 监测舯吃水(右舷)
		/// </summary>
		[FieldMapper("SHIP.REAL_MIDS_DRAFT", TypeCode.Int32, TankConstant.DRAFTSTATUS_PARAM)]
		public double RealMidSDraft
		{
			get { return realMidSDraft; }
			set
			{
				realMidSDraft = value;
				RaisePropertyChanged("RealMidSDraft");
			}
		}

		/// <summary>
		/// 监测艏吃水(左舷)
		/// </summary>
		[FieldMapper("SHIP.REAL_FWDP_DRAFT", TypeCode.Int32, TankConstant.DRAFTSTATUS_PARAM)]
        public double RealFwdPDraft
		{
            get { return realFwdPDraft; }
            set
            {
				realFwdPDraft = value;
                RaisePropertyChanged("RealFwdPDraft");
            }
        }

        /// <summary>
        /// 监测艏吃水(右舷)
        /// </summary>
        [FieldMapper("SHIP.REAL_FWDS_DRAFT", TypeCode.Int32, TankConstant.DRAFTSTATUS_PARAM)]
        public double RealFwdSDraft
		{
            get { return realFwdSDraft; }
            set
            {
				realFwdSDraft = value;
                RaisePropertyChanged("RealFwdSDraft");
            }
        }

        /// <summary>
        /// 监测横倾
        /// </summary>
        [FieldMapper("SHIP.REAL_HEEL", TypeCode.Int32, TankConstant.DRAFTSTATUS_PARAM)]
        public double RealHeel
        {
            get { return realHeel; }
            set
            {
                realHeel = value;
                RaisePropertyChanged("RealHeel");
            }
        }

        /// <summary>
        /// 监测纵倾
        /// </summary>
        [FieldMapper("SHIP.REAL_TRIM", TypeCode.Int32, TankConstant.DRAFTSTATUS_PARAM)]
        public double RealTrim
        {
            get { return realTrim; }
            set
            {
                realTrim = value;
                RaisePropertyChanged("RealTrim");
            }
        }

        [FieldMapper("NO5_COT_P.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO5COTP_Volm
        {
            get { return no5COTP_Volm; }
            set
            {
                no5COTP_Volm = value;
                RaisePropertyChanged("NO5COTP_VOLM");
            }
        }

        [FieldMapper("NO5_COT_S.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO5COTS_Volm
        {
            get { return no5COTS_Volm; }
            set
            {
                no5COTS_Volm = value;
                RaisePropertyChanged("NO5COTS_Volm");
            }
        }

        [FieldMapper("NO4_COT_P.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO4COTP_Volm
        {
            get { return no4COTP_Volm; }
            set
            {
                no4COTP_Volm = value;
                RaisePropertyChanged("NO4COTP_Volm");
            }
        }

        [FieldMapper("NO4_COT_S.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO4COTS_Volm
        {
            get { return no4COTS_Volm; }
            set
            {
                no4COTS_Volm = value;
                RaisePropertyChanged("NO4COTS_Volm");
            }
        }

        [FieldMapper("NO3_COT_P.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO3COTP_Volm
        {
            get { return no3COTP_Volm; }
            set
            {
                no3COTP_Volm = value;
                RaisePropertyChanged("NO3COTS_Volm");
            }
        }

        [FieldMapper("NO3_COT_S.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO3COTS_Volm
        {
            get { return no3COTS_Volm; }
            set
            {
                no3COTS_Volm = value;
                RaisePropertyChanged("NO3COTS_Volm");
            }
        }

        [FieldMapper("NO2_COT_P.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO2COTP_Volm
        {
            get { return no2COTP_Volm; }
            set
            {
                no2COTP_Volm = value;
                RaisePropertyChanged("NO2COTS_Volm");
            }
        }

        [FieldMapper("NO2_COT_S.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO2COTS_Volm
        {
            get { return no2COTS_Volm; }
            set
            {
                no2COTS_Volm = value;
                RaisePropertyChanged("NO2COTS_Volm");
            }
        }

        [FieldMapper("NO1_COT_P.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO1COTP_Volm
        {
            get { return no1COTP_Volm; }
            set
            {
                no1COTP_Volm = value;
                RaisePropertyChanged("NO1COTS_Volm");
            }
        }

        [FieldMapper("NO1_COT_S.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO1COTS_Volm
        {
            get { return no1COTS_Volm; }
            set
            {
                no1COTS_Volm = value;
                RaisePropertyChanged("NO1COTS_Volm");
            }
        }




        [FieldMapper("NO5_WBT_P.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO5WBTP_Volm
        {
            get { return no5WBTP_Volm; }
            set
            {
                no5WBTP_Volm = value;
                RaisePropertyChanged("NO5WBTP_Volm");
            }
        }

        [FieldMapper("NO5_WBT_S.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO5WBTS_Volm
        {
            get { return no5WBTS_Volm; }
            set
            {
                no5WBTS_Volm = value;
                RaisePropertyChanged("NO5WBTS_Volm");
            }
        }

        [FieldMapper("NO4_WBT_P.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO4WBTP_Volm
        {
            get { return no4WBTP_Volm; }
            set
            {
                no4WBTP_Volm = value;
                RaisePropertyChanged("NO4WBTP_Volm");
            }
        }

        [FieldMapper("NO4_WBT_S.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO4WBTS_Volm
        {
            get { return no4WBTS_Volm; }
            set
            {
                no4WBTS_Volm = value;
                RaisePropertyChanged("NO4WBTS_Volm");
            }
        }

        [FieldMapper("NO3_WBT_P.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO3WBTP_Volm
        {
            get { return no3WBTP_Volm; }
            set
            {
                no3WBTP_Volm = value;
                RaisePropertyChanged("NO3WBTP_Volm");
            }
        }

        [FieldMapper("NO3_WBT_S.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO3WBTS_Volm
        {
            get { return no3WBTS_Volm; }
            set
            {
                no3WBTS_Volm = value;
                RaisePropertyChanged("NO3WBTS_Volm");
            }
        }

        [FieldMapper("NO2_WBT_P.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO2WBTP_Volm
        {
            get { return no2WBTP_Volm; }
            set
            {
                no2WBTP_Volm = value;
                RaisePropertyChanged("NO2WBTP_Volm");
            }
        }

        [FieldMapper("NO2_WBT_S.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO2WBTS_Volm
        {
            get { return no2WBTS_Volm; }
            set
            {
                no2WBTS_Volm = value;
                RaisePropertyChanged("NO2WBTS_Volm");
            }
        }

        [FieldMapper("NO1_WBT_P.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO1WBTP_Volm
        {
            get { return no1WBTP_Volm; }
            set
            {
                no1WBTP_Volm = value;
                RaisePropertyChanged("NO1WBTP_Volm");
            }
        }

        [FieldMapper("NO1_WBT_S.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double NO1WBTS_Volm
        {
            get { return no1WBTS_Volm; }
            set
            {
                no1WBTS_Volm = value;
                RaisePropertyChanged("NO1WBTS_Volm");
            }
        }

        [FieldMapper("FPT.VOLM", TypeCode.Int32, TankConstant.CALC_PARAM)]
        public double FPT_Volm
        {
            get { return fpt_Volm; }
            set
            {
                fpt_Volm = value;
                RaisePropertyChanged("FPT_Volm");
            }
        }
    }
}
